<?php

/* реализация
 * $form->errorSummary($model);
 *
 */
function smarty_function_afErrorSummary($params, &$smarty)
{
    $widget = $smarty->getTemplateVars("_widgetActiveForm");
    $model = $smarty->getTemplateVars("_modelForWidgetActiveForm");
    if (!$widget)
    {
        throw new CException(Yii::t('afErrorSummary must be applay fot widget ActiveForm'));
    }
    echo $widget->errorSummary($model);
}
